<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/solution_list.css">
    <link rel="stylesheet" href="download (4)/font_2233695_6sc8g8kw1ak/iconfont.css">
    <link rel="stylesheet" href="http://10.35.164.2/company/css/current.css">
</head>
<body>
    <header>
        <div class="head_wrap_top">
            <div class="head_top">
                <ul class="nav">
                    <li><a href="http://10.35.164.2/company/index.html">网站首页</a></li>
                    <li><a href="#">传悦资源</a></li>
                    <li><a href="http://10.35.164.2/company/cases_list.html">传悦案例</a></li>
                    <li><a href="#">传悦服务</a></li>
                    <li class="nav_onclick_li"><a href="http://10.35.164.2/company/solution_list.html">解决方案</a></li>
                    <li><a href="">需求提交</a></li>
                </ul>
                <div class="right_info">
                    <span class="iconfont icon-icon-"></span>
                    <span class="iconfont icon-gongzhonghao"></span>
                    <span class="iconfont icon-weibo"></span>
                    <span class="iconfont icon-qq"></span>
                    <p>0535_60652189<span class="iconfont icon-weibiaoti-"></span></p>
                </div>
            </div>
        </div>
        <div class="head_wrap_bottom">
            <div class="head_bottom">
                <div class="logo">
                    <img src="http://10.35.164.2/company/images/首页_02.jpg" alt="">
                </div>

            </div>
            <div class="head_bottom_position"> <span> 网站首页 > 传悦观点</span></div>
        </div>
    </header>
    <section>
        <div class="section">
            <img src="http://10.35.164.2/company/images/新.png" alt="" class="new_img">

            <div class="model box">
                <div class="left">
                    <p class="date"></p>
                    <b class="day"></b>
                </div>
                <dl class="right">
                    <dt><img src= ></dt>
                    <a href="">
                        <dd>
                            <h3 class="title"></h3>
                            <p >标题： &nbsp;&nbsp;&nbsp;<span class="fu_title">  </span></p>
                            <h5 class="info"></h5>
                        </dd>
                    </a>
                </dl>
            </div>

        </div>
            <ul class="con_bottom">
                <li></li>
                <li><a href="">1</a></li>
                <li class="con_bottom_onclick_li"><a href="">2</a></li>
                <li><a href="">3</a></li>
                <li><a href="">4</a></li>
                <li></li>
            </ul>
    </section>
    <footer>
        <div class="footer">
            <div class="footer_right">
                <ul class="footer_top">
                    <li>关于传悦</li>
                    <li>新闻动态</li>
                    <li>传悦观点</li>
                    <li>联系传悦</li>
                    <li>加入传悦</li>
                    <li>付款账户</li>
                </ul>
            <br>
                <div class="footer_info">Copyright @2013 &nbsp;&nbsp;创梦科技有限责任公司&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;&nbsp;传说 Chnyoo. cn All Rights Reserved &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;京ICP备12005221号
                </div>
            </div>
        </div>
    </footer>
</body>
</html>
<script src="http://10.35.164.2/company/xxk_onclick.js"></script>
<script>
    //导航部分选选项卡
    let onav_li = document.querySelectorAll("header .head_top .nav li");
    xuanxiangka(onav_li,"nav_onclick_li");

    //链接数据库获取数据 克隆节点
let omodel = document.querySelector(".section .model");
let osection = document.querySelector("section .section")
// console.log(osection);
let http = new XMLHttpRequest();
http.open("get","http://10.35.164.2:81/company_sol_all");
// http.open("get","http://192.168.43.24:81/company_sol_all");
http.send();
http.onreadystatechange = function(){
    if(http.readyState === 4){
        let solutionlist = JSON.parse(http.response);
        // console.log(solutionlist);
        solutionlist.forEach(function(item,index){
            let newdiv = omodel.cloneNode(true);
            newdiv.className = "box";
            newdiv.setAttribute("data_index",item.id)
            osection.appendChild(newdiv);
            newdiv.querySelector(".left .date").innerHTML = item.solution_date;
            newdiv.querySelector(".left .day").innerHTML = item.solution_day;
            newdiv.querySelector(".right img").src = item.img_src;
            newdiv.querySelector(".right .title").innerHTML = item.solution_title;
            newdiv.querySelector(".right .fu_title").innerHTML = item.solution_fu_title;
            newdiv.querySelector(".right .info").innerHTML = item.solution_info;
            let id = newdiv.getAttribute("data_index")
            newdiv.querySelector("a").href = `http://10.35.164.2:81/company_solution_details?id=${id}`;
            // newdiv.querySelector("a").href = `http://192.168.43.24:81/company_solution_details?id=${id}`;

            // // 跳转链接
            // newdiv.onclick = function(){
            //     let id = newdiv.getAttribute("data_index")
            //     let xml = new XMLHttpRequest();
            //     // console.log(id);
            //     // xml.open("get",`http://192.168.43.24:81/company_sol_click?id=${id}`);
            //     xml.open("get",`http://10.35.164.2:81/company_solution_details?id=${id}`);
            //     xml.send();
            //     xml.onreadystatechange = function(){
            //         if(readyState === 4){
            //             console.log("success!")
            //         }
            //         // else{
            //         //     alert("error!");
            //         // }
            //     }

            // }

        })
    }
}

</script>
